export interface SelectAreaProps {
  modelValue: boolean
  defaultAreaCode?: Array<string> | any
  safeAreaInsetBottom?: boolean
  maskCloseAble?: boolean
  title?: string
  showPopularCity?: boolean
}

export type AddressData = { name: string; code: string; }

export type SelectResult = {
  action?: 'confirm' | 'cancel'
  province?: AddressData
  city?: AddressData
  area?: AddressData
}

export interface SelectAreaMethod {
  /**
   * 根据行政编码查询地区名称
   * @param adCode 行政编码，例："440104"
   * @return {boolean|Array<string>} 查询失败返回false，查询成功返回名称数组，格式：[省份, 城市, 区县]
   */
  queryAreaName: (adCode: string) => boolean | Array<string>
}

//热门城市列表
export const popularCityList = [
  {
    name: '北京', //展示的热门城市名称
    province: '北京市', //热门城市省份
    city: '市辖区', //热门城市名
    area: '东城区' //热门城市区/县
  },
  {
    name: '上海',
    province: '上海市',
    city: '市辖区',
    area: '黄浦区'
  },
  {
    name: '广州',
    province: '广东省',
    city: '广州市',
    area: '荔湾区'
  },
  {
    name: '深圳',
    province: '广东省',
    city: '深圳市',
    area: '罗湖区'
  },
  {
    name: '成都',
    province: '四川省',
    city: '成都市',
    area: '锦江区'
  },
  {
    name: '杭州',
    province: '浙江省',
    city: '杭州市',
    area: '上城区'
  },
  {
    name: '南京',
    province: '江苏省',
    city: '南京市',
    area: '玄武区'
  },
  {
    name: '重庆',
    province: '重庆市',
    city: '市辖区',
    area: '万州区'
  }
]